<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--1.设置移动端自适应-->
    <meta name="viewport" content="width= device-width initial-scale=1.0">
    <title>博客发布</title>
    <!--2.导入semantic UI CDN-->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/css/me.css">
</head>
<body>

<!--建立导航-->
<nav class="ui inverted attached segment">
    <!--主页导航栏-->
    <div class="ui container me_padding_mini">
        <div class="ui inverted stackable menu">
            <!--建立网页导航-->
            <h2 class="ui teal header item">后台管理</h2>
            <a class="m-item item m-mobile-hide" href="#"><i class="icon home"></i>博客</a>
            <a class="m-item item m-mobile-hide" href="#"><i class="icon idea"></i>分类</a>
            <a class="m-item item m-mobile-hide" href="#"><i class="icon tags"></i>标签</a>

            <!--登录框-->
            <div class="ui m-item m-mobile-hide dropdown right aligned item">
                <div class="ui text">
                    <img src="https://picsum.photos/id/1/100/100?image=1003" alt="" class="ui avatar image">
                    Leaf
                </div>
                <i class="ui dropdown icon"></i>
                <div class="ui menu">
                    <a href="#" class="item">注销</a>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black button icon m-top-right m-mobile-show" style="display: none">
        <i class="sidebar icon middle aligned"></i>
    </a>
</nav>

<div class="ui menu pointing attached">
    <div class="ui container">
        <div class="right menu">
            <a href="#" class="item active">发布</a>
            <a href="#" class="item">列表</a>
        </div>
    </div>

</div>

<!--中间内容-->
<div class="ui container m-padding-big">
    <form action="#" method="post" class="ui form">
        <div class="field required">
            <div class="ui left labeled input">
                <div class="ui compact selection dropdown teal basic label">
                    <input type="hidden" value="原创">
                    <i class="dropdown icon"> </i>
                    <div class="default text">原创</div>
                    <div class="menu">
                        <div class="item" data-value="原创">原创</div>
                        <div class="item" data-value="转载">转载</div>
                        <div class="item" data-value="翻译">翻译</div>
                    </div>
                </div>
                <input type="text" name="title" placeholder="标题">
            </div>
        </div>

        <div class="field">
            <textarea placeholder="博客内容" name="content"></textarea>
        </div>

        <div class="two fields">
            <div class="field">
                <div class="ui left labeled input fluid">
                    <label for="" class="ui compact teal basic label">分类</label>
                    <div class="ui selection dropdown fluid">
                        <input type="hidden" value="type">
                        <i class="dropdown icon"> </i>
                        <div class="default text">分类</div>
                        <div class="menu">
                            <div class="item" data-value="错误日志">错误日志</div>
                            <div class="item" data-value="开发者手册">开发者手册</div>
                            <div class="item" data-value="认知升级">认知升级</div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="field right">
                <div class="ui left labeled input ">
                    <label for="" class="ui compact teal basic label">标签</label>
                    <div class="ui multiple search selection dropdown fluid">
                        <input type="hidden" value="tag">
                        <i class="dropdown icon"> </i>
                        <div class="default text">标签</div>
                        <div class="menu">
                            <div class="item" data-value="java">java</div>
                            <div class="item" data-value="javascript">javascript</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="field">
            <div class="ui left labeled input">
                <label for="" class="ui teal basic label">首图</label>
                <input type="text" name="indexPicture" placeholder="首图引用地址">
            </div>
        </div>

        <div class="inline fields">
            <div class="field">
                <div class="ui checkbox">
                    <input type="checkbox" class="hidden" checked id="recommend" name="recommend">
                    <label for="recommend">推荐</label>
                </div>
            </div>

            <div class="field">
                <div class="ui checkbox">
                    <input type="checkbox" class="hidden" id="info" name="info">
                    <label for="info">分享信息说明</label>
                </div>
            </div>

            <div class="field">
                <div class="ui checkbox">
                    <input type="checkbox" class="hidden" id="appreciation" name="appreciation">
                    <label for="appreciation">赞赏</label>
                </div>
            </div>

            <div class="field">
                <div class="ui checkbox">
                    <input type="checkbox" class="hidden" id="comment" name="comment">
                    <label for="comment">评论</label>
                </div>
            </div>
        </div>

        <!--        提出错误信息-->
        <div class="ui error message"></div>

        <div class="ui container right aligned">
            <button type="button" class="ui button" onclick="window.history.go(-1)">返回</button>
            <button type="button" class="ui secondary button">保存</button>
            <button type="submit" class="ui teal button">提交</button>
        </div>


    </form>
</div>

<!--底部 footer-->
<footer class="ui inverted attached segment m-padding-big">
    <div class="container ui center aligned ">
        <!--使用栅格系统-->
        <div class="ui  inverted divided grid">
            <div class="three wide column"><img src="../static/image/me.jpeg" class="ui rounded image" alt=""
                                                style="width: 110px"></div>
            <div class="three wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">用户故事</a>
                    <a href="#" class="item">用户体验</a>
                    <a href="#" class="item">练习清单</a>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">用户故事</a>
                    <a href="#" class="item">用户体验</a>
                    <a href="#" class="item">练习清单</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header">联系我们</h4>
                <P class="m-opacity_mini">这是我的个人博客。会分享有关编程的相关信息，希望可以给到这里的人有所帮助</P>
            </div>
        </div>
        <div>
            <div class="ui inverted section divider"></div>
            <p class="m-opacity_mini">© 2019 Leaf. All Rights Reserved.</p>
        </div>
    </div>
</footer>

<!--3.导入Jquery CDN-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<!--2.导入semantic UI CDN-->
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script>
    //设置手机端隐藏
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });
    //设置二维码弹窗
    $('#payButton').popup({
        popup: $('.payQR.popup'),
        on: 'click',
        position: 'bottom center'
    });

    $('.ui.dropdown')
        .dropdown({
            on: 'hover'
        });

    //设置必填项
    $('.ui.form').form({
        fields: {
            title: {
                identifier: 'title',
                rules: [{
                    type: 'empty',
                    prompt: '标题: 请输入博客标题'
                }]
            }
        }
    });
</script>

</body>
</html>